package model;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;


/**
 * The persistent class for the ITEM_PERIODO_ALQUILER database table.
 * 
 */
@Entity
@Table(name="ITEM_PERIODO_ALQUILER")
@NamedQuery(name="ItemPeriodoAlquiler.findAll", query="SELECT i FROM ItemPeriodoAlquiler i")
public class ItemPeriodoAlquiler implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private ItemPeriodoAlquilerPK id;

	@Column(name="COSTO_ALQUILER", nullable=false, precision=5, scale=5)
	private BigDecimal costoAlquiler;

	//bi-directional many-to-one association to Item
	@ManyToOne
	@JoinColumn(name="ITEM_ID", nullable=false, insertable=false, updatable=false)
	private Item item;

	//bi-directional many-to-one association to PeriodoAlquiler
	@ManyToOne
	@JoinColumn(name="PERIODO_ALQUILER_ID", nullable=false, insertable=false, updatable=false)
	private PeriodoAlquiler periodoAlquiler;

	public ItemPeriodoAlquiler() {
	}

	public ItemPeriodoAlquilerPK getId() {
		return this.id;
	}

	public void setId(ItemPeriodoAlquilerPK id) {
		this.id = id;
	}

	public BigDecimal getCostoAlquiler() {
		return this.costoAlquiler;
	}

	public void setCostoAlquiler(BigDecimal costoAlquiler) {
		this.costoAlquiler = costoAlquiler;
	}

	public Item getItem() {
		return this.item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public PeriodoAlquiler getPeriodoAlquiler() {
		return this.periodoAlquiler;
	}

	public void setPeriodoAlquiler(PeriodoAlquiler periodoAlquiler) {
		this.periodoAlquiler = periodoAlquiler;
	}

}